import request from '@/utils/request'

const prefixUrl = 'web/saleYearTarget'

// 添加或补充销售年度目标
export function add(data) {
  return request({
    url: prefixUrl + '/add',
    method: 'post',
    content_type: 'json',
    data
  })
}

// 补充销售年度目标
export function replenish(data) {
  return request({
    url: prefixUrl + '/replenish',
    method: 'post',
    content_type: 'json',
    data
  })
}

// 列表
export function page(params) {
  return request({
    url: prefixUrl + '/page',
    method: 'get',
    params
  })
}

// 详情
export function detail(params) {
  return request({
    url: prefixUrl + '/detail',
    method: 'get',
    params
  })
}

// 获取半年数据
export function querySaleYearTargetSummary(params) {
  return request({
    url: prefixUrl + '/querySaleYearTargetSummary',
    method: 'get',
    params
  })
}

// 校准用户目标数据
export function calibration(params) {
  return request({
    url: prefixUrl + '/calibration',
    method: 'post',
    params
  })
}


